package com.xueshishasha.oa.service;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;

import org.hibernate.criterion.DetachedCriteria;

import com.xueshishasha.oa.common.utils.PageModel;
import com.xueshishasha.oa.common.utils.PaginationParas;
import com.xueshishasha.oa.model.Employee;

public interface EmployeeService {
	
	public Employee authentication(Employee e);
	
	public Serializable register(Employee e);
	
	public Boolean logout(String id);
	
	public Employee getInfo(String id);
	
	public void updateInfo(Employee e);
	
	public boolean changePassword(String id,String oldpassword,String newpassword);
	
	//public List<Employee> getAddressList(String id); //感觉是多余的
	
	//public Object getDepartmentInfo(String id); //也是多余的
	
	public Serializable save(Employee e);
	
	public void delete(Employee e);

	public List<Employee> getAll();

	public Employee getModelById(Serializable id);
	
	public List<Employee> getModels(String sql, Object[] parameters);
	
	public void saveOrUpdate(Employee e);
	
	public void saveOrUpdateAll(Collection<Employee> ce);
	
	public void update(Employee e);
	
	//public List<Employee> getModelsByCri();
	
	public List<Employee> getByCriteria(DetachedCriteria dc);
	
	public Long getCount();

	public List<Employee> findAllByCriteria(final DetachedCriteria detachedCriteria);
	
	//-----------分页-----------
	
	public PageModel list( String hql,  Object[] paras,
			 int offset,  int count);
	
	public PageModel listByPage( String hql,  Object[] paras,
			 int pageIndex,  int count);
	
	public PageModel listByPage(PaginationParas p);
	public List getFlexObejct();
}
